//
//  ContrastTableViewController.m
//  CarHome
//
//  Created by lanou3g on 15-4-26.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "ContrastTableViewController.h"



#define viewWidth self.view.frame.size.width
#define viewHeight self.view.frame.size.height

@interface ContrastTableViewController ()
@property (nonatomic, retain) UIButton *contrastButton;//开始对比按钮
@property (nonatomic, retain) UIButton *addButton;//添加按钮
@property (nonatomic, retain) UIButton *edingButton;//编辑按钮

@end

@implementation ContrastTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, 10, viewWidth, viewHeight/4)];
    v.backgroundColor = [UIColor grayColor];
    [self.tableView.tableFooterView addSubview:v];

    
    
    self.contrastButton = [[UIButton alloc] initWithFrame:CGRectMake(10, viewHeight - 200, viewWidth - 10, 50)];
    self.contrastButton.backgroundColor = [UIColor colorWithRed:0.337 green:0.826 blue:1.000 alpha:1.000];
    self.contrastButton.titleLabel.text = @"添加对比";
    [self.contrastButton addTarget:self action:@selector(contrastButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [v addSubview:_contrastButton];
    
    
    self.addButton = [[UIButton alloc] initWithFrame:CGRectMake(viewWidth - 200, viewHeight - 70, 80, 40)];
    self.addButton.backgroundColor = [UIColor blueColor];
    self.addButton.titleLabel.text = @"添加";
    [self.addButton addTarget:self action:@selector(addButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [v addSubview:_addButton];
    
    
    self.edingButton = [[UIButton alloc] initWithFrame:CGRectMake(viewHeight/4, viewHeight - 70, 80, 40)];
    self.edingButton.backgroundColor = [UIColor blueColor];
    self.edingButton.titleLabel.text = @"编辑";
    
    [self.edingButton addTarget:self action:@selector(edingButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [v addSubview:_edingButton];

    
    
}

#pragma mark - 开始对比按钮方法实现
- (void)contrastButtonAction:(UIButton *)sender
{
    
    
    
}

#pragma mark - 添加按钮方法实现
- (void)addButtonAction:(UIButton *)sender
{
    
}

#pragma mark - 编辑按钮方法实现
- (void)edingButtonAction:(UIButton *)sender
{
    
}


    
   


#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{

    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

    return 20;
}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *idefierCell = @"mycell";
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:idefierCell];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:idefierCell];
    }
    
    
    return cell;
}

#pragma mark - 行高
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 50;
}


- (void)dealloc
{
    
    [_contrastButton release];
    [_addButton release];
    [_edingButton release];
    
    [super dealloc];
}


@end
